import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';

const WeatherDataCardMeta: IPublicTypeComponentMetadata = {
  componentName: 'WeatherDataCard',
  title: '气象数据卡片',
  category: '组合组件',
  group: '气象防灾',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: 'hzdz-charts',
    version: '0.1.0',
    exportName: 'WeatherDataCard',
    main: 'src/index.tsx',
    destructuring: true,
    subName: ''
  },
  props: [
    {
      name: 'ref',
      propType: 'object',
    },
    {
      name: 'key',
      propType: 'string',
    },
    {
      name: 'style',
      propType: 'object',
    },
    {
      name: 'className',
      propType: 'string',
    },
    {
      name: 'width',
      propType: 'number',
      description: '组件宽度'
    },
    {
      name: 'height',
      propType: 'number',
      description: '组件高度'
    },
    {
      name: 'backgroundColor',
      propType: 'string',
      description: '背景颜色'
    },
    {
      name: 'backgroundOpacity',
      propType: 'number',
      description: '背景透明度'
    },
    {
      name: 'borderRadius',
      propType: 'number',
      description: '边框圆角'
    },
  ],
  configure: {
    props: [],
    supports: {
      style: true
    }
  }
};

const snippets: IPublicTypeSnippet[] = [
  {
    schema: {
      componentName: 'WeatherDataCard',
      props: {
        width: 500,
        height: 1080,
        backgroundColor: '#586570',
        backgroundOpacity: 0.38,
        borderRadius: 4,
        theme: 'dark'
      }
    }
  }
];

export default {
  ...WeatherDataCardMeta,
  snippets
};
